import { buildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  // 获取设计组织列表数据-工业化设计管理
  getDesignOrgData: {
    url: '/api/v1/jt_org/get_org',
    method: 'get'
  },
  //获取设计组织详情数据
  getOrgDetailData: {
    url: '/api/v1/jt_org/get_org/detail',
    method: 'get',
    type: 'restful'
  },
  //获取设计项目列表
  getDesignPro: {
    url: '/api/v1/jt_project/get_project_list',
    method: 'get'
  },
  //新增项目
  addProject: {
    url: '/api/v1/jt_project/get_project_list',
    method: 'post'
  },
  //修改项目
  editProject: {
    url: '/api/v1/jt_project/get_project_list',
    method: 'put',
    type: 'restful'
  },
  //查看项目
  getProDetail: {
    url: '/api/v1/jt_project/get_project_list',
    method: 'get',
    type: 'restful'
  },
  //删除项目
  delProject: {
    url: '/api/v1/jt_project/get_project_list',
    method: 'delete',
    type: 'restful'
  },
  //获取组织下拉列表
  getOrgList: {
    url: '/api/v1/jt_org/get_org_select',
    method: 'get'
  },
  //组织-同步
  orgCommit: {
    url: '/api/v1/jt_org/sync_org',
    method: 'get'
  },
  //项目-同步 
  proCommit: {
    url: '/api/v1/jt_project/sync_project',
    method: 'get'
  },
  //关联组织-关联组织-关联按钮触发时调用的接口
  onRela: {
    url: '/api/v1/jt_org/union',
    method: 'post'
  },
  //关联组织-关联组织-关联按钮触发后弹框中的树的接口
  getChildOrg: {
    url: '/api/v1/jt_org/children_org',
    method:'get'
  }
}
export default buildService(settings)
